<? include_once("config.php")?>
<!doctype html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
        <? require_once('title.php');?>
        <link href="favicon.ico" rel="shortcut icon">
        <link rel="stylesheet" href="css/common/swiper.css">
        <link rel="stylesheet" href="css/common/base.css">
        <link rel="stylesheet" href="css/common/media.css">
        <link rel="stylesheet" href="css/common/animation.css">
        <link rel="stylesheet" href="css/newsInfo/style.css">
    </head>
    <body>
        <div class="beginning left flex flex-align-items">
                <i class="line top"></i>
                <i class="line bottom"></i>
                <img src="img/common/beginningLogo.png" alt="入场logo图">
        </div>
        <div class="beginning right flex flex-align-items">
                <i class="line top"></i>
                <i class="line bottom"></i>
                <img src="img/common/beginningLogoTxt.png" alt="入场logo文字">
        </div>
        <div class="cutLetter flex flex-align-items flex-justify-content">
            <p>创意</p>
            <p class="mid">规范</p>
            <p>智能</p>
        </div>
        <div class="container horizontal">
            <? require_once('header.php');?>
            <main>
                 <div class="newsInfo ready fluid">
                    <div class="title">
                        <p class="chn"><span>新闻中心</span></p>
                        <p class="eng"><span>NEWS</span></p>
                        <i class="tp horizontal"></i>
                        <i class="lft vertical"></i>
                        <i class="btm horizontal"></i>
                        <i class="rht vertical"></i>
                        <div class="newsNav flex">
                            <a href="news.php?gid=0" class="flex flex-align-items">
                                <span class="line"></span>公司新闻
                            </a>
                            <a href="news.php?gid=1" class="flex flex-align-items">
                                <span class="line"></span>访谈讲座
                            </a>
                            <a href="news.php?gid=2" class="flex flex-align-items">
                                <span class="line"></span>文娱活动
                            </a>
                        </div>
                    </div>
					
				
		
		<div class="content">
									<?
						if (isset($_REQUEST['nid']) && $_REQUEST['nid']>0)
						{
							$nid = $_REQUEST['nid'];
							$newsRs = $maindb->Execute("SELECT * FROM t_news WHERE IsShow=1 AND id=?",array($nid));
							if ($newsRs->RecordCount() >0)
							{
								$maindb->Execute("UPDATE t_news SET Hits=Hits+1 WHERE id=?",array($nid));
								$newsObj = $newsRs->FetchObject();
								?>
												<p><?=$newsObj->TITLE?></p>
												<span class="date"><?echo date("Y-m-d",strtotime($newsObj->NOTETIME));?></span>
												<ul>
													<?=$newsObj->CONTENT?>	
												</ul>
												
												
														  <?
							}
							else
							{
								@header("HTTP/1.1 404 Not Found");
								@header("Status: 404 Not Found");
								exit();
							}
						}
						else
						{
							@header("HTTP/1.1 404 Not Found");
							@header("Status: 404 Not Found");
							exit();
						}
						?>
						
                        <div class="next">
                            <p style="text-align:left"><a href="newsd.php?nid=<? $rd = $maindb->Execute("SELECT * FROM t_news WHERE IsShow=1 AND NewType='".$newsObj->NEWTYPE."' AND OrderBy<".$newsObj->ORDERBY." ORDER BY OrderBy DESC limit 0,1");
		if ($rd->RecordCount() == 1)
		{ echo $rd->fields['id'] ;} else {echo $newsObj->ID;}?>&gid=<?=$_REQUEST['gid']?>">下一篇：<? $rd = $maindb->Execute("SELECT * FROM t_news WHERE IsShow=1 AND NewType='".$newsObj->NEWTYPE."' AND OrderBy<".$newsObj->ORDERBY." ORDER BY OrderBy DESC limit 0,1");
		if ($rd->RecordCount() == 1)
		{ echo $rd->fields['Title'] ;} else {echo $newsObj->TITLE;}?></a></p>
                            <a href="javascript:history.go(-1);">返回</a>
                        </div>
                    </div>
		

					
                    
                </div>
            </main>
            <? require_once('footer.php');?>
        </div>
        
       
        <script src="js/common/swiper.js"></script>
        <script src="js/common/jquery.js"></script>
        <script>
            var flag_lianxing= JSON.parse(sessionStorage.getItem('flag_lianxing'));
            if (typeof jQuery == 'undefined') {
                console.log(" 未加载")
                if(flag_lianxing){
                    console.log("自动刷新一次未加载")
                }else{
                    sessionStorage.setItem('flag_lianxing', JSON.stringify("1"));
                    window.location.reload();
                }
        
            } else {
                console.log(" 已加载")
            }
        </script>
        <script src="js/common/common.js"></script>
        <script src="js/common/animation.js"></script>
    </body>
</html>